package com.lesson12.dynamic;


/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/9/3 9:39
 */
public class Client
{
    public static void main(String[] args)
    {
        TeacherDao teacherDao = new TeacherDao();
        ITeacherDao instance = (ITeacherDao) new ProxyFactory(teacherDao).getInstance();
        System. out. println(" instance=" + instance. getClass());
        instance.teach();
        instance.say("tom");
    }
}
